home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / kernel / raid / devRaidIOC.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-19  |  2.9 KB  |  128 lines

  1. /* 
  2.  * devRaidIOC.c --
  3.  *
  4.  *    Declarations for RAID device drivers.
  5.  *
  6.  * Copyright 1989 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  *
  15.  */
  16.  
  17. #ifndef lint
  18. static char rcsid[] = "$Header: /cdrom/src/kernel/Cvsroot/kernel/raid/devRaidIOC.c,v 1.8 90/10/12 14:00:59 eklee Exp $ SPRITE (Berkeley)";
  19. #endif /* not lint */
  20.  
  21. #include "sync.h"
  22. #include <stdio.h>
  23. #include "devRaid.h"
  24. #include "devRaidUtil.h"
  25.  
  26.  
  27. /*
  28.  *----------------------------------------------------------------------
  29.  *
  30.  * Raid_ReportRequestError --
  31.  *
  32.  *    This procedure is called when an IO request issued by the RAID
  33.  *    device driver failes.
  34.  *
  35.  * Results:
  36.  *    None.
  37.  *
  38.  * Side effects:
  39.  *    Prints an error message.
  40.  *
  41.  *----------------------------------------------------------------------
  42.  */
  43.  
  44. void
  45. Raid_ReportRequestError(reqPtr)
  46.     RaidBlockRequest    *reqPtr;
  47. {
  48.     printf("RAID:REQ_ERR:raid %d %d:pos %d %d %d:op %d:status %d:dev %d %d:req %d %d\n",
  49.         reqPtr->raidPtr->devicePtr->type, reqPtr->raidPtr->devicePtr->unit,
  50.         reqPtr->row, reqPtr->col, reqPtr->version,
  51.         reqPtr->devReq.operation, reqPtr->status,
  52.         reqPtr->diskPtr->device.type, reqPtr->diskPtr->device.unit,
  53.         reqPtr->devReq.startAddress, reqPtr->devReq.bufferLen);
  54. }
  55.  
  56.  
  57. /*
  58.  *----------------------------------------------------------------------
  59.  *
  60.  * Raid_ReportHardInitFailure --
  61.  *
  62.  *    This procedure is called when a hard initialization failes on a stripe.
  63.  *
  64.  * Results:
  65.  *    None.
  66.  *
  67.  * Side effects:
  68.  *    Prints an error message.
  69.  *
  70.  *----------------------------------------------------------------------
  71.  */
  72.  
  73. void
  74. Raid_ReportHardInitFailure(stripeID)
  75.     int        stripeID;
  76. {
  77.     printf("RAID:HARD_INIT_ERR:stripe %d\n", stripeID);
  78. }
  79.  
  80.  
  81. /*
  82.  *----------------------------------------------------------------------
  83.  *
  84.  * Raid_ReportParityCheckFailure --
  85.  *
  86.  *    This procedure is called when a parity check failes on a stripe.
  87.  *
  88.  * Results:
  89.  *    None.
  90.  *
  91.  * Side effects:
  92.  *    Prints an error message.
  93.  *
  94.  *----------------------------------------------------------------------
  95.  */
  96.  
  97. void
  98. Raid_ReportParityCheckFailure(stripeID)
  99.     int        stripeID;
  100. {
  101.     printf("RAID:PARITY_CHECK_ERR:stripe %d\n", stripeID);
  102. }
  103.  
  104.  
  105. /*
  106.  *----------------------------------------------------------------------
  107.  *
  108.  * Raid_ReportReconstructionFailure --
  109.  *
  110.  *    This procedure is called when a reconstruction failes.
  111.  *
  112.  * Results:
  113.  *    None.
  114.  *
  115.  * Side effects:
  116.  *    Prints an error message.
  117.  *
  118.  *----------------------------------------------------------------------
  119.  */
  120.  
  121. void
  122. Raid_ReportReconstructionFailure(col, row)
  123.     int        col, row;
  124. {
  125.     printf("RAID:RECONST_ERR:pos %d %d\n", row, col);
  126. }
  127.  
  128.